interface IUserInfo {
  token: string
  id: number
  menus: IKey[]
  role: string
  avatar: string
  userName: string
  nickName: string
  createdAt: string
  updatedAt: string
}

interface IUpdateUserInfo {
  oldPassword: string
  newPassword: string
  nickName: string
}

interface IUserState {
  userInfo: IUserInfo
  updateUserInfo: IUpdateUserInfo
  name: string
}

//角色枚举
enum roleTypes {
  boss = "boss",
  leader = "leader",
  farmer = "farmer"
}

//路由大分类枚举
enum IFrontRouterConfigKey {
  list = "list",
  pic = "pic",
  camer = "camer"
}

//三级路由类型配置
interface IFrontRouterConfigData {
  sqlName: string
  menuName: string
  icon: string
  roles: roleTypes[]
  url: string
}

//二级路由类型配置
interface IKey {
  data: IFrontRouterConfigData[]
  roles: roleTypes[]
  name: string
  icon: string
  url: string
}

//路由配置类型
interface IFrontRouterConfig {
  [IFrontRouterConfigKey.list]: IKey
  [IFrontRouterConfigKey.pic]: IKey
  [IFrontRouterConfigKey.camer]: IKey
}

export {
  IUserState,
  IUserInfo,
  roleTypes,
  IFrontRouterConfigKey,
  IKey,
  IFrontRouterConfig,
  IUpdateUserInfo
}
